load 'rds_api.rb'
@rds = @rds_tt

ap = IO.readlines("all-pcodes.txt")
codes = []
ap.each do |a|
    code = a.split('-')[0].to_s
    codes += [code]
end
codes = codes.uniq

codes.each do |code|
    sql = " ALTER TABLE `tutem_mall`.`eb_spreader_daily_report` ADD COLUMN `#{code}` decimal(8, 2) NULL DEFAULT 0.00 AFTER `TTFZY`;"
    #puts sql
    queryRds sql
end
